home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacWorld 1999 January - Disc 2
/
Macworld (1999-01) (Disk 2).dmg
/
Serious Demos
/
Symbolic Composer 4.2
/
Environment
/
Projects
/
Tutorial Material
/
Zone Tutorial
/
Structure Examples
/
4. Demo3
< prev
next >
Wrap
Lisp/Scheme
|
1998-10-26
|
2KB
|
89 lines
; demo3 - neural examples
(setq tonals
(activate-tonality (chromatic c 4) (major c 4) (c maj maj7 2 4)
(b& min 7 1 3) (aeolian f 3 )))
(setq rhy1 '(1/16 1/16 1/16 1/16 -1/16 1/16 1/16 1/16
-1/16 1/16 -1/16 1/16 1/16 1/16 -1/16 1/16)
)
(setq rhy2 '(1/16 1/16 1/16 1/16 -1/16 1/16 1/16 1/16
-1/16 1/8 1/16 1/16 1/8 1/16)
)
(setq mel1 '(a b c d))
(setq mel2 '(a b c d ac bd ad cb))
(setq mel3 '((a b c d)))
(gen-hopalong-symbol xmel (a d) ymel (a d) 100 200 300 0.45 16 0)
; good example because it creates 2 outputs
(def-neuron zmel
(and (in 1 'c)
(in 2 'c))
'=
(and (in 1 'b)
(in 2 'b))
'=
(and (in 1 'c)
(in 1 'c -1))
(in 1 +4)
(or (in 1 'a)
(in 2' a))
'e
(not (in 1 '(ae)))
'fg
(otherwise (in 1 0)) ; returns the symbols in xmel
)
(setq mel4 (run-neuron 'zmel
xmel ymel))
#|
(def-neuron zmel
(and (in 1 '(c c))
(in 2 '(c b)))
(symbol-trim 8 (find-change ymel))
(and (in 1 'b)
(in 2 'b))
(symbol-trim 8 (symbol-inversion 'b xmel))
(otherwise (in 1 0))
)
(setq mel4 (run-neuron 'zmel
xmel ymel))
|#
(def-neuron sym-to-len1
(in 1 'a) '(1/8)
(in 1 'c) '(1/4)
(otherwise '1/16)
)
(def-neuron sym-to-len2
(in 1 'a) '(1/8 1/16 1/16)
(in 1 'c) '(1/4 -1/16 1/16 1/8)
(otherwise '1/8)
)
(setq rhy3 (run-neuron 'sym-to-len2 mel1))
; simplest expression of Neural Expert
(def-symbol
solo mel1
)
(def-length
solo rhy3
)
(compile-song-p "ccl;output:" 1/4 "demo3"
; !---!---!---!---
changes tonals " . . . . "
solo changes "----------------"
)